<!-- --------------------------------------
 * 首页
-------------------------------------- --->
<template>
  <div class="home" v-loading="loading">
    首页
    <button @click="previewImage()">测试</button>
    <el-input :value="inputValue" placeholder="请输入" v-number.float="inputValue"></el-input>
  </div>
</template>

<script>
import ImageViewer from '../utils/image-viewer'

export default {
  data() {
    return {
      loading: false,
      inputValue: ''
    }
  },
  created() {
    this.getList()
  },
  methods: {
    previewImage() {
      const urlList = [
        'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
        'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
      ]
      ImageViewer(urlList)
    },
    onInput(val) {
      console.log('onInput', val)
      this.inputValue = val
    },
    async getList() {
      // this.loading = true
      // const [data, arr] = await this.$awitTo(this.$http.get('/xxx'))
      // this.loading = false
      // if (data) this.data = data

    }
  }
}
</script>

<style lang="scss">
.home {
}
</style>
